﻿using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Threading;

namespace Speedy
{
    static class Program
    {
        public static DevExpress.LookAndFeel.DefaultLookAndFeel look = new DevExpress.LookAndFeel.DefaultLookAndFeel();

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            bool acik;
            Mutex Mtx = new Mutex(true, "Management", out acik);
            if (!acik)
            {
                MessageBox.Show("Bu program, zaten Çalışıyor.");
                return;
            }
            GC.KeepAlive(Mtx);

            look.LookAndFeel.SkinName = "The Asphalt World";
            DevExpress.Skins.SkinManager.EnableFormSkins();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Config.GetConfig.Path = Application.StartupPath;
            Config.GetConfig.Load();
            Logging.GetLog.LogFile = Application.StartupPath + "\\Hata.txt";
            DataLayer.GetLayer.CnnString = Config.GetConfig.GetValue(CParams.ConStr);
            Application.Run(new frmMain());
        }
    }
}
